<!DOCTYPE html>
<!-- saved from url=(0041)http://localhost:1230/apistore/login.html -->
<html style="height: auto;"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>工业微服务中心</title>
  <!-- Tell the browser to be responsive to screen width -->
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  <link rel="shortcut icon" type="image/x-icon" href="../../favicon.ico">
  <link rel="stylesheet" href="../../css/bootstrap.min.css">
  <link rel="stylesheet" href="../../css/font-awesome.min.css">
  <link rel="stylesheet" href="../../css/AdminLTE.min.css">
  <!-- AdminLTE Skins. Choose a skin from the css/skins
       folder instead of downloading all of them to reduce the load. -->
  <link rel="stylesheet" href="../../css/all-skins.min.css">
  <link rel="stylesheet" href="../../css/main.css">
  <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
  <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  <!--[if lt IE 9]>
  <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
  <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  <![endif]-->
</head>
<body class="login-page" style="height: auto;">
<div id="rrapp" class="login-box"><div class="login-logo"><b>工业微服务中心</b></div> <div class="login-box-body"><p class="login-box-msg">平台后台管理</p> <!----> <div class="form-group has-feedback"><input type="text" placeholder="账号" class="form-control"> <span class="glyphicon glyphicon-user form-control-feedback"></span></div> <div class="form-group has-feedback"><input type="password" placeholder="密码" class="form-control"> <span class="glyphicon glyphicon-lock form-control-feedback"></span></div> <div class="form-group has-feedback"><input type="text" placeholder="验证码" class="form-control"> <span class="glyphicon glyphicon-warning-sign form-control-feedback"></span></div> <div class="form-group has-feedback"><img alt="如果看不清楚，请单击图片刷新！" src="../../captcha.jpg" class="pointer">
          &nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:;">点击刷新</a></div> <div class="row"><div class="col-xs-13"><button type="button" class="btn btn-info btn-block btn-flat">登录</button></div></div> <div class="row"><div class="col-xs-8"><div class="checkbox icheck"></div></div> <div class="col-xs-4"><a class="register">立即注册&gt;&gt;</a></div></div></div></div>
<!-- /.login-box -->
<script src="./js/jquery.min.js"></script>
<script src="./js/jquery.jqGrid.min.js"></script>
<script src="./js/vue.min.js"></script>
<script src="./js/bootstrap.min.js"></script>
<script src="./js/app.js"></script>
<script src="../../js/common.js"></script>
<script type="text/javascript">
    var vm = new Vue({
        el:'#rrapp',
        data:{
            username: '',
            password: '',
            captcha: '',
            showform:true,
            error: false,
            errorMsg: '',
            src: 'captcha.jpg'
        },
        beforeCreate: function(){
            if(self != top){
                top.location.href = self.location.href;
            }
        },
        methods: {
            refreshCode: function(){
                this.src = "captcha.jpg?t=" + $.now();
            },
            login: function () {
                var data = "username="+vm.username+"&password="+vm.password+"&captcha="+vm.captcha;
                $.ajax({
                    type: "POST",
                    url: baseURL + "sys/login",
                    data: data,
                    dataType: "json",
                    success: function(r){
                        if(r.code == 0){//登录成功
                            localStorage.setItem("token", r.token);
                            parent.location.href ='index.html';
                        }else{
                            vm.error = true;
                            vm.errorMsg = r.msg;
                            vm.refreshCode();
                        }
                    }
                });
            },
            toRegister:function(){
            	 //跳转到 注册页面
            	 parent.location.href = baseURL + 'register.html';
            }
        }
    });
</script>


</body></html>